= render 'backend/shared/financial_year_warning'

= kujaku do |k|
  - k.text
  - sm = PurchaseOrder.state_machine.states
  - k.multi_choice :state, [:opened, :closed].map { |s| [sm[s].human_name, s] }, label: PurchaseOrder.human_attribute_name(:state)
  - k.helper :journal_period_crit
  - responsibles = User.where(id: PurchaseOrder.select(:responsible_id).distinct)
  - if responsibles.any?
    - k.helper do
      %label= PurchaseOrder.human_attribute_name(:responsible)
      = select_tag(:responsible_id, options_for_select([[]] +  responsibles.map{|u| [u.label, u.id]}, params[:responsible_id].to_i))
- main_toolbar do |t|
  = t.new params: { redirect: nil }
  = link_to :generate_parcel.tl, { controller: :receptions, action: :new }, { class: 'btn btn-default no-icn disabled', id: 'generate-parcel-btn' }

= main_list data: 'reconciliation_state'
